1. Field of the Invention
The invention relates to image recognition methods, image processing apparatuses, and image recognition programs, and, more particularly, to an image recognition method, an image processing apparatus, and an image recognition program capable of detecting a subject in an image.
2. Description of the Related Art
There is a technique for detecting a vehicle or a pedestrian from an image obtained by a fixed camera or a camera installed in a mobile unit in a traffic system. For example, such a technique for detecting a vehicle or a pedestrian is used in a case in which data of an image obtained at a traffic intersection is used to detect whether a vehicle or a pedestrian exists at the traffic intersection and information about the detected vehicle or pedestrian is transmitted to a traveling vehicle. The driver of the traveling vehicle can check in advance the state of the traffic intersection.
Methods of extracting a vehicle to be detected from an image include a background subtraction method and an edge detection method. The background subtraction method is a method of extracting an object from an image by comparing a background image including no object, which has been obtained in advance, with the image including the object. The edge detection method is a method of specifying an object (a vehicle) by comparing model edge data, which has been stored in advance, with detected edge data. A technique related to the above techniques is disclosed in Japanese Laid-open Patent Publication No. 2005-190142 and Japanese Laid-open Patent Publication No. 2000-148977.
In the case of the background subtraction method, the position of a vehicle in an image cannot be accurately detected, since a region including not only the vehicle but also the shadow of the vehicle is detected. In the case of the edge detection method, the shadow of an object is also detected. Furthermore, it takes much time to detect an object, since the object is specified by comparing shape data obtained by edge detection with pieces of shape data stored in advance in a database.